package com.imooc.mall.model.dao;

import com.imooc.mall.model.request.ProductRequestQuery;
import com.imooc.mall.model.pojo.Product;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;
@Repository
public interface ProductMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(Product record);

    int insertSelective(Product record);

    Product selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(Product record);

    int updateByPrimaryKey(Product record);

    Product selectByName(String name);

    int updateBySellStatus(@Param("ids") Integer ids[], @Param("status") Integer status);

    List<Product> selectByListAll();

    List<Product> selectList(@Param("query") ProductRequestQuery query);

}